import faker from 'faker';

export default function (mocker) {
  mocker.get('profile/subjects', () => {
    return new Array(10).fill(0).map(() => ({
      name: faker.name.firstName()
    }));
  });

  mocker.post('ticket/sendCode', () => {
    return {
      success: true,
      errorMsg: '登陆成功',
      result: null
    };
  });

  mocker.post('ticket/register', () => {
    return {
      success: true,
      errorMsg: '登陆成功',
      result: null
    };
  });

  mocker.get('ticket/psndoc', () => {
    return {
      success: true,
      errorMsg: '',
      result: [{
          psnId: 4,
          name: '1',
          userid: '1',
          linkCountryCode: '86',
          linkphone: '1',
          confirmCountryCode: '86',
          confirmphone: '1',
          email: '1',
          position: '1',
          company: '1',
          industry: '1',
          scale: '1',
          updateTime: 1548709455000,
          createTime: 1548709455000,
          isDel: 0
        },
        {
          psnId: 5,
          name: '赵六',
          userid: '12345678901234567897',
          linkCountryCode: '86',
          linkphone: '12345678900',
          confirmCountryCode: '86',
          confirmphone: '12345678900',
          email: '123@123.com',
          position: 'ceo',
          company: 'Alibaba',
          industry: 'it',
          scale: '100000人',
          updateTime: 1548818243000,
          createTime: 1548709455000,
          isDel: 0
        },
        {
          psnId: 6,
          name: '1',
          userid: '1',
          linkCountryCode: '86',
          linkphone: '1',
          confirmCountryCode: '86',
          confirmphone: '1',
          email: '1',
          position: '1',
          company: '1',
          industry: '1',
          scale: '1',
          updateTime: 1548709455000,
          createTime: 1548709455000,
          isDel: 0
        }
      ]
    };
  });
}
